package com.lkm.app_ui.m.Imple.steelyard_auto;

import android.content.Context;

import com.lkm.app_ui.AppConst;
import com.lkm.app_ui.help.GsonHelp;
import com.lkm.frame.P;
import com.lkm.frame.module.GetInitModuleParamBootTask;
import com.lkm.frame.module.ModuleDelegate;
import com.lkm.frame.module.ModuleManager;
import com.lkm.frame.task2.ITaskExecutor;
import com.lkm.frame.task2.Task;
import com.lkm.frame.task2.TaskManager;
import com.lkm.javatool.StringHelp;
import com.lkm.market2_0.AppDataCache;
import com.lkm.market2_0.ExpandConfig;
import com.lkm.market2_0.TaskIdIndex;
import com.lkm.market2_0.entity.OrganizationInfo;
import com.lkm.market2_0.entity.ResponEntity;
import com.lkm.market2_0.m.app_main.AppMainModule;
import com.lkm.market2_0.m.dataUp.DataUpModule;
import com.lkm.market2_0.netapi.Api;
import com.lkm.market2_0.task.AsyncTask2;
import com.lkm.market2_0.task.DefaultTaskExecutor;

import java.util.HashMap;
import java.util.List;
import java.util.Map;



public class LoadDeviceInitTask extends GetInitModuleParamBootTask<Void, DeviceinitPo> {
    public LoadDeviceInitTask(ModuleManager mModuleManager, ModuleDelegate moduleDelegate) {
        super(new DefaultTaskExecutor(true), LoadDeviceInitTask.class.getName(), AppConst.getTaskManager2(), AppConst.getModuleManager(), moduleDelegate);
    }

    @Override
    protected void onDependencyModuleLoadFail() {
    }

    @Override
    public void doExecuting(Void param) {
        super.doExecuting(param);
        mTaskExecutor.executor(new Runnable() {
            @Override
            public void run() {
                DeviceinitPo deviceinitPo = GsonHelp.fromJson(AppConst.getApplication().getSharedPreferences("settingapp", Context.MODE_PRIVATE).getString("DeviceinitPo", null), DeviceinitPo.class);


//                    deviceinitPo.comPath = "Minew_V5.44H";

                complete(new BootTaskResultWarp<InitModuleParam<DeviceinitPo>>(true, new InitModuleParam<DeviceinitPo>("1.0", deviceinitPo)));
            }
        });
    }
}
